package video.threaddemo.callable;

import java.util.concurrent.Callable;

public class CallableDemo implements Callable<String> {
    private String str;

    public CallableDemo(String str){
        this.str = str;
    }

    @Override
    public String call() {
        try {
            Thread.sleep(4*1000);
            System.out.println(Thread.currentThread().getName()+":"+str);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return str;
    }
}
